home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Utilities / BareED / DAC / source / bareed_dac.i < prev    next >
Text File  |  2001-04-17  |  6KB  |  223 lines

  1.     IFND BAREED_DAC_I
  2.     BAREED_DAC_I    SET    1
  3. *
  4. **    BAREED_DAC
  5. **
  6. **    (C) Copyright 2001 J.v.d.Loo
  7. **
  8. **    Any declared pointer (below) is only readable because it points to a BareED intern variable!
  9. **    Never change it!!!
  10. **
  11. **    Any DAC-application can be compiled for a 68020 CPU since BareED itself presupposes it!    
  12. **
  13. **    Note that function parameters must be passed onto stack! - and the values returned by
  14. **    a CallBack-Hook are passed on the stack, too.
  15. **
  16. **    The result of a function, however, is returned in register D0.
  17. **
  18. *
  19.  
  20.     IFND    EXEC_LIBARIES_I
  21.     INCLUDE "exec/libraries.i"
  22.     ENDC
  23.  
  24.     IFND    GRAPHICS_GFXBASE_I
  25.     INCLUDE "graphics/gfxbase.i"
  26.     ENDC
  27.  
  28.     IFND    INTUITION_INTUITIONBASE_I
  29.     INCLUDE "intuition/intuitionbase.i"
  30.     ENDC
  31.  
  32.     IFND    INTUITION_SCREENS_I
  33.     INCLUDE "intuition/intuitionbase.i"
  34.     ENDC
  35.  
  36.     IFND    WORKBENCH_STARTUP_I
  37.     INCLUDE "workbench/startup.i"
  38.     ENDC
  39.  
  40.     IFND    LIBRARIES_LOCALE_I
  41.     INCLUDE "libraries/locale.h"
  42.     ENDC
  43.  
  44.     ; Returned by "pm_CreateProgressBar()" - see below.
  45.     ; Don't assume anything about the ProgressBar more than here stated -
  46.     ; in real it has got much more items!
  47.     ;
  48.     STRCUTURE ProgressBar,0
  49.     ; The only item visible so far...
  50.     APTR    pb_Window
  51.     LABEL    PB_SIZEOF        ; Not really the end...
  52.  
  53.  
  54.  
  55.  
  56.     STRUCTURE PseudoMsg,0
  57.     ; Normal start-up-message, with one argument (path & filename)
  58.     ; LN_NAME points to "BAREED"
  59.     ; LN_PRI set to zero (= version of this structure - 0 means beta)
  60.     ;
  61.     STRUCT    pm_Startup,sm_SIZEOF
  62.  
  63.  
  64.     ; Following is private, do not read or modify!
  65.     ;
  66.     BPTR    pm_Lock
  67.     APTR    pm_Name
  68.     STRUCT    pm_FileName,108
  69.     STRUCT    pm_Dir,256
  70.  
  71.  
  72.     ; Library bases (assume at least all are v36, except: Asl v38, Icon & Diskfont v33, Locale v1)
  73.     ;
  74.     APTR    pm_GfxBase
  75.     APTR    pm_IntuitionBase
  76.     APTR    pm_GadToolsBase
  77.     APTR    pm_DiskfontBase
  78.     APTR    pm_AslBase
  79.     APTR    pm_IconBase
  80.     APTR    pm_LocaleBase
  81.     APTR    pm_WorkbenchBase
  82.  
  83.     ; If you have to do own rendering using GadTools, these two may help you.
  84.     ; But beware of releasing them - BareED is the owner!
  85.     ;
  86.     APTR    VisualInfo;        ; Never release it!
  87.     APTR    DrawInfo;        ; Never release it!
  88.  
  89.  
  90.     ; Storage (buffer) start and size
  91.     ;
  92.     APTR    pm_RegionStart
  93.     ULONG    pm_RegionSize
  94.  
  95.  
  96.     ; Archive start and end
  97.     ;
  98.     APTR    pm_TextStart
  99.     APTR    pm_TextEnd
  100.  
  101.  
  102.     ; Application was started with this marked block
  103.     ;
  104.     APTR    pm_BlockStart
  105.     APTR    pm_BlockEnd
  106.  
  107.  
  108.     ; Editor is using this attribute for the used font
  109.     ;
  110.     APTR    pm_FontAttr
  111.  
  112.  
  113.     ; By editor used font
  114.     ;
  115.     APTR    pm_Font
  116.  
  117.  
  118.     ; The editor's surrounding
  119.     ;
  120.     APTR    pm_EdWindow
  121.  
  122.  
  123.     ; How wide is a tab character in pixels
  124.     ;
  125.     ULONG    pm_TabWidth
  126.  
  127.  
  128.     ; A tab stop occurs every 'n' characters (almost!)
  129.     ;
  130.     ULONG    pm_TabStops;
  131.  
  132.  
  133.     ; Rightmost offset set to 'n' characters (may zero!!!)
  134.     ;
  135.     ULONG    pm_RightMargin;
  136.  
  137.  
  138.     ; Pointer to 256 bytes - same order like LATIN-1 char-set - where each byte holds
  139.     ; the width of the concerned character, e. g. at offset 32 the width of the SPACE-
  140.     ; character can be found
  141.     ;
  142.     APTR    pm_CharSpace        ; Pointer to the character-spaces of the used font
  143.  
  144.  
  145.     ; Currently, following two function pointers are out of order (they are empty!!!)
  146.     ; To check if the current BareED version support those two, check them against zero!
  147.     ;
  148.     APTR    pm_GetAttr
  149.     APTR    pm_ChangeAttr
  150.  
  151.  
  152.     ; Two functions to permit/allow modifications through user-interface --- NOTE:
  153.     ; Since BareED protects the archive against modification (user/Arexx) there is no need to
  154.     ; call these functions - furthermore - even if you call AllowInput() it will not turn off
  155.     ; the protection - it only allows the user to scroll around in the text-file (for example)
  156.     ; which is anyway the defaulted mode!
  157.     ; void    (*pm_BlockInput)( void);
  158.     ; void    (*pm_AllowInput)( void);
  159.     ;
  160.     APTR    pm_BlockInput
  161.     APTR    pm_AllowInput
  162.  
  163.  
  164.     ; Display a simple text-requester whithout inhibiting the user from changing BareED's
  165.     ; interface. You could call BlockInput() first...
  166.     ; void    (*pm_Tell)( STRPTR str);
  167.     ;
  168.     APTR    pm_Tell
  169.  
  170.  
  171.     ; Display a simple text-requester without inhibiting the user from changing BareED's
  172.     ; interface. The user can react on the requester with "YES" or "NO".
  173.     ; unsigned int    (*pm_CaseTell)( STRPTR str);
  174.     ;
  175.     APTR    pm_CaseTell
  176.  
  177.  
  178.     ; Display a simple number-requester with inhibiting the user from changing BareED's
  179.     ; interface!
  180.     ;    initial     = intial number for the string-gadget that may be changed by the user later on
  181.     ;    winname  = title of the requester
  182.     ;    hailtext = the text displayed as body
  183.     ;    gadtext  = there is only one bool-gadget in this requester, this is the string for it
  184.     ;    zero     = must be set to zero!
  185.     ;   Returns NULL if user abandoned or the entered number
  186.     ; unsigned int    (*pm_RequestNumber)( unsigned int initial, STRPTR winname, STRPTR hailtext, STRPTR gadtext, BOOL zero);
  187.     ;
  188.     APTR    pm_RequestNumber
  189.  
  190.  
  191.     ; Four functions - please refere to the DAC-guide for function-reference
  192.     ; unsigned int    (*pm_StrPixelLen)( unsigned char *start, unsigned char *end);
  193.     ; void        (*pm_DumpStrLine)( unsigned char *start, unsigned char *end, struct RastPort *rp, unsigned int x, unsigned int y);
  194.     ; unsigned int    (*pm_WidestStrLen)( unsigned char *text, unsigned char *stop, unsigned int (*inform_code)( unsigned int len, unsigned int line), unsigned int inform);
  195.     ; void        (*pm_DumpStrings)( struct RastPort *rp, unsigned int (*dump_code)( unsigned int len, unsigned int line), unsigned char *text, unsigned char *stop);
  196.     ;
  197.     APTR    pm_StrPixelLen
  198.     APTR    pm_DumpStrline
  199.     APTR    pm_WidestStrLen
  200.     APTR    pm_DumpStrings
  201.  
  202.  
  203.     ; Functions attached to the progress-bar - refere to DAC-guide...
  204.     ; void            (*pm_FreeProgressBar)( struct ProgressBar *pb);
  205.     ; struct ProgressBar *    (*pm_CreateProgressBar)( STRPTR wintitle, STRPTR hail, STRPTR stop, STRPTR cont, STRPTR cancel);
  206.     ; unsigned int        (*pm_PullPBarEvent)( struct ProgressBar *pb);
  207.     ; void            (*pm_ChangePBarIndicator)( struct ProgressBar *pb, unsigned int percent, STRPTR hail);
  208.     ;
  209.     APTR    pm_FreeProgressBar
  210.     APTR    pm_CreateProgressBar
  211.     APTR    pm_PullPBarEvent
  212.     APTR    pm_ChangePBarIndicator
  213.  
  214.     ; <<< Following does not work properly yet - so don't use! >>>
  215.     ;
  216.     ; void    (*pm_TogglePBarGad)( struct ProgressBar *pb);
  217.     ;
  218.     APTR    pm_TogglePBarGad
  219.  
  220.     LABEL    PSMSG_SIZEOF
  221.  
  222.     ENDC    ; BAREED_DAC_I
  223.